package mr.ali.video.web.mapper;

import mr.ali.video.web.model.CollectionPlay;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

/**
* <p>
    *  Mapper 接口
    * </p>
*
* @author Mr-ali
* @since 2025-08-03
*/
    @Repository
    public interface CollectionPlayMapper extends BaseMapper<CollectionPlay> {

    @Update("update collection_play set displayed =#{displayed}  where id=#{id}")
    Integer updateDisplayed(@Param("id") Integer id, @Param("displayed") Integer displayed);

    /**
     * 剧集的已发布的计数*/
    @Select("select COUNT(*) from collection_play")
    Integer CountByTypeId();
    }
